<template>
	<view class="container">
		<image src="/static/image/Home.png" class="logo" />
		<view class="form-input">
			<input class="ipt" placeholder="请输入手机号码" />
		</view>
		<view class="form-input">
			<input class="ipt" placeholder="请输入验证码" />
			<text style="color: #ff1f3d">获取验证码</text>
		</view>
		<view class="btn-login btn-login-phone" v-on:tap="login">立即登录</view>

		<view class="privacy">
			<u-checkbox v-model="agreement" :checked="agreement" @change="checkboxChange" size="14" active-color="#ED174D"></u-checkbox>
			<view>
				我已阅读、理解并同意
				<text class="nav" v-on:tap="goToUrl(1)">《隐私政策》</text>
				<text class="nav" v-on:tap="goToUrl(2)">《用户服务协议》</text>
			</view>
		</view>
	</view>
</template>
<script>
import { uNavigateBack } from '../../utils/uniUtils';

export default {
	data() {
		return {
			agreement: false
		};
	},
	methods: {
		// 勾选版权协议
		checkboxChange(e) {
			this.agreement = e;
		},
		login() {
			uNavigateBack(2);
		},
		goToUrl(l) {
			uNavigateTo('/pages/article/' + (l == 1 ? 'privacy' : 'agreement'));
		}
	}
};
</script>

<style lang="scss" scoped>
.container {
	height: 100vh;
	background-color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;

	.logo {
		width: 250rpx;
		height: 250rpx;
		border-radius: 50%;
		margin: 30px 0;
	}

	.login-img {
		margin-top: 10px;
		width: 530rpx;
	}

	.btn-login {
		width: 70%;
		padding: 12px 20px;
		margin-top: 20px;
		text-align: center;
		font-weight: bold;
		border-radius: 20px;
		border: none;

		&-phone {
			background-color: #ff2838;
			color: #fff;
		}
		&-one {
			background-color: #f2f4f7;
			color: #141414;
		}
	}

	.privacy {
		width: 80%;
		display: flex;
		margin-top: 20px;
		color: #333333;

		.nav {
			color: #ff1f3d;
		}
	}

	.form-input {
		background-color: #f2f4f7;
		width: 80%;
		padding: 12px 20px;
		margin-top: 20px;
		border-radius: 20px;
		display: flex;
		align-items: center;
		.ipt {
			flex: 1;
		}
	}
}
</style>
